

var buff = Buffer.from('ssawe3', 'ascii')
console.log('hex:', buff.toString('hex'))
console.log('base64:', buff.toString('base64'))


var buff = Buffer.from([1, 2, 3])
console.log('hex:', buff.toString('hex'))
console.log('base64:', buff.toString('base64'))
buff.write('aa')
console.log('+yyy:', buff.toString('hex'))

var buff = Buffer.alloc(10, 1)
console.log('hex:', buff.toString('hex'))
console.log('base64:', buff.toString('base64'))

console.log('json:', JSON.stringify(buff))

console.log('-------------------------------------- test buffer ok -------------------- ')

